import request from "@/util/request";

export const getBookByEbookReq = (name: string) => {
  return request({
    url: "/api/ebook/getEbookByEbookReq",
    method: "get",
    params: {
      name,
    },
  });
};

export const getEbookListByPage = (params: any) => {
  return request({
    url: "/api/ebook/getEbookListByPage",
    method: "get",
    params: params,
  });
};

export const removeEbook = (id: number) => {
  return request({
    url: "/api/ebook/remove",
    method: "delete",
    params: {
      id,
    },
  });
};

export const editEbook = (ebook: any) => {
  return request({
    url: "/api/ebook/save",
    method: "post",
    data: ebook,
  });
};
